<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/4/12
 * Time: 17:30
 */

namespace app\index\controller;

use think\Controller;
use think\Db;
use app\index\model\PostModel;
class Set extends Controller{
    public function problem(){
        $param=input("param.");
        if(request()->isPost()) {
            $param['type'] = 0;
            $model = new PostModel();
            return json(msg(1, $model->getLists($param), ''));
        }
        return $this->fetch();
    }
    public function notebook(){
        $param=input("param.");
        if(request()->isPost()) {
            $param['type'] = 1;
            $model = new PostModel();
            return json(msg(1, $model->getLists($param), ''));
        }
        return $this->fetch();
    }
    public function test(){
        $obj=json_decode('{}');
        return json(msg(1,$obj,''));
    }
}